home *** CD-ROM | disk | FTP | other *** search
/ Gigantic Games 2 / Gigantic Games 2.iso / pc / _c_ / chaos / install < prev    next >
Text File  |  1994-12-23  |  11KB  |  346 lines

  1. ;
  2. ;   Chaos:            The Chess HAppening Organisation System    V5.1a
  3. ;   Copyright (C)   1993    Jochen Wiedmann
  4. ;
  5. ;   This program is free software; you can redistribute it and/or modify
  6. ;   it under the terms of the GNU General Public License as published by
  7. ;   the Free Software Foundation; either version 2 of the License, or
  8. ;   (at your option) any later version.
  9. ;
  10. ;   This program is distributed in the hope that it will be useful,
  11. ;   but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. ;   GNU General Public License for more details.
  14. ;
  15. ;   You should have received a copy of the GNU General Public License
  16. ;   along with this program; if not, write to the Free Software
  17. ;   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. ;
  19. ;   This is the Installation-script (Installer 1.24)
  20. ;   $VER: Chaos-Install 5.1a (23.07.93)
  21. ;
  22.  
  23.  
  24. ;
  25. ;   Printing the disclaimer
  26. ;
  27. ;============================================================================
  28. ;   English strings
  29. (set default_lang 2)
  30.  
  31. (set #Chaos-Message (cat
  32.     "Chaos:     The Chess HAppening Organisation System\n\n"
  33.     "V5.1a      Copyright © 1993        Jochen Wiedmann\n\n"
  34.     "This program is FREE SOFTWARE; you can redistribute "
  35.     "it and/or modify it under the terms of the GNU General "
  36.     "Public License as published by the Free Software "
  37.     "Foundation; either version 2 or any later version.\n\n"
  38.     "This program is distributed in the hope that it will be "
  39.     "useful, but WITHOUT ANY WARRANTY! See the GNU General "
  40.     "Public License (in the COPYING-file) for more details."
  41. ))
  42.  
  43. (set #Kickstart-Message
  44.     "Sorry, you need Kickstart 2.04 or higher to run Chaos!"
  45. )
  46.  
  47. (set #Ask-Bindir-Help (cat
  48.     "We begin with installing the binary.\n\n"
  49.     "You are asked to select a directory where this "
  50.     "should go to. Typical choices would be C: or Work:bin "
  51.     "for running Chaos as a CLI-command and "
  52.     "Sys: or Tools: to install Chaos as "
  53.     "a Workbench-application.\n\n"
  54.     "Other parts of the program will go to different places. "
  55.     "You will be asked for them later.\n\n\n"
  56. ))
  57.  
  58. (set #Ask-Bindir-Message "Please select a binary-directory:")
  59.  
  60. (set #Copying-binary-Message "Copying the binary...")
  61.  
  62. ;   The following must contain a '%s' which will receive a directory-name
  63. (set #Ask-s-dir-Help (cat
  64.     "We go on selecting a directory where the default-icon "
  65.     "(called Chaos_Project.icon) will live.\n\n"
  66.     "Chaos will look for it in %s or s:.\n\n\n"
  67. ))
  68.  
  69. ;   The following must contain a '%s' which will receive a directory-name
  70. (set #Ask-s-dir-Message
  71.     "Please select an icon-directory\n(s: or %s recommended)"
  72. )
  73.  
  74. (set #Copying-s-Message "Copying the default-icon...")
  75.  
  76. (set #Ask-Languages-Help (cat
  77.     "The last thing that should be installed are the catalogs.\n\n"
  78.     "Catalogs allow to use Chaos in different languages. "
  79.     "Currently only German and English are possible.\n\n"
  80.     "You are asked to select the languages that should be installed "
  81.     "by clicking on the related buttons.\n\n\n"
  82. ))
  83.  
  84. (set #Ask-Languages-Message
  85.     "Please select the languages that should be installed:"
  86. )
  87.  
  88. ;   The following must contain a '%s' which will receive a directory-name
  89. (set #Ask-Cat-dir-Help (cat
  90.     "The Catalog-files should be installed in a directory where Chaos "
  91.     "will find them. Chaos will look into %s and Locale:Catalogs.\n\n\n"
  92. ))
  93.  
  94. ;   The following must contain a '%s' which will receive a directory-name
  95. (set #Ask-Cat-dir-Message (cat
  96.     "Please select a catalog-directory\n(%s or Locale:Catalogs "
  97.     "recommended)"
  98. ))
  99.  
  100. (set #Copying-Cat-Message "Copying the Catalogs...")
  101.  
  102. (set #Set-Default-Language "Setting the icons default langauge...")
  103. (set #Set-Default-Language-Help (cat
  104.     "It is possible to use other languages than german even without the "
  105.     "locale.library. The icon needs a tooltype LANGUAGE in that case, "
  106.     "which i want to setup now.\n\n"
  107. ))
  108.  
  109.  
  110. ;============================================================================
  111. ;   German strings
  112. (if (= @language "deutsch")
  113. (
  114.  
  115. (set default_lang 1)
  116.  
  117. (set #Chaos-Message (cat
  118.     "Chaos:     The Chess HAppening Organisation System\n"
  119.     "V5.1a      Copyright © 1993        Jochen Wiedmann\n\n"
  120.     "Dieses Programm ist FREIE SOFTWARE; sie können Sie verändern "
  121.     "und/oder weitergeben, sofern Sie dabei "
  122.     "die Regeln und Bestimmungen der `GNU General Public License' "
  123.     "(Version 2 oder eine neuere Version ihrer Wahl) beachten.\n\n"
  124.     "Dieses Programm wird veröffentlicht in der Hoffnung, daß es "
  125.     "nützlich sein wird, aber OHNE JEDE GARANTIE! Bitte lesen Sie "
  126.     "Details in der `GNU General Public License', die in der "
  127.     "Datei COPYING enthalten sein muß!"
  128. ))
  129.  
  130. (set #Kickstart-Message (cat
  131.     "Tut mir leid, aber Sie brauchen Kickstart 2.04 oder höher, "
  132.     "um Chaos zu benutzen!"
  133. ))
  134.  
  135. (set #Ask-Bindir-Help (cat
  136.     "Wir beginnen mit der Installation des eigentlichen Programms.\n\n"
  137.     "Sie sollten ein Directory auswählen, wohin dieses kopiert wird, "
  138.     "z.B. C: oder Work:bin, um Chaos als CLI-Programm zu installieren "
  139.     "oder Sys: oder Work: um Chaos auf der Workbench zu installieren.\n\n"
  140.     "Andere Teile des Programms werden in andere Directories kopiert, "
  141.     "die Sie später bestimmen können.\n\n\n"
  142. ))
  143.  
  144. (set #Ask-Bindir-Message
  145.     "Bitte wählen Sie ein Directory für das eigentliche Programm."
  146. )
  147.  
  148. (set #Copying-binary-Message "Kopieren des Programms...")
  149.  
  150. ;   The following must contain a '%s' which will receive a directory-name
  151. (set #Ask-s-dir-Help (cat
  152.     "Wir machen mit der Installation des Vorgabe-Icons weiter. "
  153.     "Dieses wird in der Datei Chaos_Project.icon enthalten sein.\n\n"
  154.     "Chaos sucht danach in den Directories %s oder s:.\n\n\n"
  155. ))
  156.  
  157. ;   The following must contain a '%s' which will receive a directory-name
  158. (set #Ask-s-dir-Message (cat
  159.     "Bitte wählen Sie ein Directory für das Vorgabeicon\n(%s oder s: "
  160.     "werden empfohlen)"
  161. ))
  162.  
  163. (set #Copying-s-Message "Kopieren des Vorgabe-Icons...")
  164.  
  165. (set #Ask-Languages-Help (cat
  166.     "Als letztes installieren wir die Catalog-Dateien, die es "
  167.     "erlauben, Chaos in verschiedenen Sprachen zu benutzen. "
  168.     "Zur Zeit sind leider nur Deutsch und Englisch möglich.\n\n"
  169.     "Sie sollten die gewünschten Sprachen durch Anklicken der "
  170.     "entsprechenden Gadgets anklicken.\n\n\n"
  171. ))
  172.  
  173. (set #Ask-Languages-Message
  174.     "Bitte wählen Sie die Sprachen aus, die installiert werden sollen:"
  175. )
  176.  
  177. ;   The following must contain a '%s' which will receive a directory-name
  178. (set #Ask-Cat-dir-Help (cat
  179.     "Die Catalogs müssen in einem Directory installiert werden, wo sie "
  180.     "von Chaos gesucht werden. Chaos wird in %s und Locale:Catalogs "
  181.     "danach suchen.\n\n\n"
  182. ))
  183.  
  184. ;   The following must contain a '%s' which will receive a directory-name
  185. (set #Ask-Cat-dir-Message (cat
  186.     "Bitte wählen Sie ein Directory für die Catalogs\n(%s oder "
  187.     "Locale:Catalogs werden empfohlen)"
  188. ))
  189.  
  190. (set #Copying-Cat-Message "Kopieren der Catalogs...")
  191.  
  192. (set #Set-Default-Language "Setzen der Vorgabesprache im Icon...")
  193. (set #Set-Default-Language-Help (cat
  194.     "Selbst ohne die locale.library ist es möglich, andere Sprachen als "
  195.     "Englisch zu benutzen. In diesem Fall muß allerdings der Tooltyp "
  196.     "LANGUAGE im Icon gesetzt werden, was ich jetzt tun will.\n\n"
  197. ))
  198.  
  199. ))
  200. ;============================================================================
  201. ;   Welcome the User
  202. ;
  203. (user 1)
  204. (welcome)
  205. (set old_level @user-level)
  206. (user 2)
  207. (message #Chaos-Message)
  208. (user old_level)
  209.  
  210.  
  211. ;============================================================================
  212. ;   Check the Kickstart-version and abort if we are running V36 or lower.
  213. ;
  214. (set ver (/ (getversion "exec.library" (resident)) 65536))
  215. (if (< ver 37)
  216. (   (abort #Kickstart-Message)
  217. ))
  218.  
  219.  
  220. ;============================================================================
  221. ;   Select a directory for the binary
  222. ;
  223. (set destdir "c:")
  224. (if  (= @user-level 1)
  225. (   (set destdir (askdir
  226.     (prompt #Ask-Bindir-Message)
  227.     (help #Ask-Bindir-Help @askdir-help)
  228.     (default destdir)
  229.     ))
  230. ))
  231.  
  232.  
  233. ;============================================================================
  234. ;   Copy the binary
  235. ;
  236. (set destdir (copyfiles
  237.     (prompt #Copying-binary-Message)
  238.     (help #Ask-Bindir-Help @copyfiles-help)
  239.     (source "")
  240.     (dest destdir)
  241.     (choices "Chaos" "Chaos.info")
  242.     (confirm 1)
  243. ))
  244. (set @default-dest destdir)
  245.  
  246.  
  247. ;============================================================================
  248. ;   Select a directory where the default-icon will go to.
  249. ;
  250. (set sdestdir (tackon destdir "s"))
  251. (if (< @user-level 2)
  252. (   (set sdestdir (askdir
  253.     (prompt (#Ask-s-dir-Message sdestdir))
  254.     (help (cat (#Ask-s-dir-Help sdestdir) @askdir-help))
  255.     (default (select @user-level "s:" sdestdir))
  256.     (newpath)
  257.     ))
  258. ))
  259.  
  260.  
  261. ;============================================================================
  262. ;   Copy the default-icon
  263. ;
  264. (copyfiles
  265.     (prompt #Copying-s-Message)
  266.     (help (#Ask-s-dir-Help sdestdir) @copyfiles-help)
  267.     (source "s")
  268.     (dest sdestdir)
  269.     (all)
  270.     (confirm)
  271. )
  272.  
  273.  
  274. ;============================================================================
  275. ;   Check for locale.library
  276. ;
  277. (set catdestdir_is_set (NOT @user-level))
  278. (set catdestdir "Locale:Catalogs")
  279. (if (AND  (NOT (exists "Locale:"))  (NOT @user-level))
  280. (   (set catdestdir "Catalogs")
  281. ))
  282.  
  283.  
  284. ;============================================================================
  285. ;   Install the catalogs
  286. ;
  287. (user 2)
  288. (set languages (askoptions
  289.     (prompt #Ask-Languages-Message)
  290.     (help #Ask-Languages-Help @askoptions-help)
  291.     (choices "Deutsch" "English")
  292.     (default default_lang)
  293. ))
  294. (user old_level)
  295.  
  296. (set n 0)
  297. (while (set thislanguage (select n "Deutsch" "English" ""))
  298. (   (if (AND (<> n 1) (BITAND languages (shiftleft 1 n)))
  299.     (   (if (NOT catdestdir_is_set)
  300.     (   (set catdestdir (tackon destdir "Catalogs"))
  301.         (if (= 1 @user-level)
  302.         (   (set catdestdir (askdir
  303.             (prompt (#Ask-Cat-dir-Message catdestdir))
  304.             (help (#Ask-Cat-dir-Help catdestdir) @askdir-help)
  305.             (default catdestdir)
  306.             (newpath)
  307.         ))
  308.         ))
  309.         (set catdestdir_is_set 1)
  310.     ))
  311.  
  312.     (if (<> (exists catdestdir) 2)
  313.     (   (makedir catdestdir)
  314.     ))
  315.     (set catdestdir (pathonly (copyfiles
  316.         (prompt #Copying-Cat-Message)
  317.         (help (#Ask-Cat-dir-help (tackon destdir "Catalogs"))
  318.            @copyfiles-help)
  319.         (source (tackon "Catalogs" thislanguage))
  320.         (dest (tackon catdestdir thislanguage))
  321.         (all)
  322.         (confirm)
  323.     )))
  324.     (if (AND (= (+ n 1) default_lang) (= ver 37))
  325.     (   (if (<> default_lang 2)
  326.         (   (tooltype
  327.             (prompt #Set-Default-Language)
  328.             (help #Set-Default-Language-Help)
  329.             (setstack 20000)
  330.             (noposition)
  331.             (dest (tackon destdir "Chaos.info"))
  332.             (settooltype "(This is the default icon's path.)")
  333.             (settooltype "(s: will be searched additionally.)")
  334.             (settooltype (cat "(DEFICON=" @sdestdir ")"))
  335.             (settooltype "(This suppresses creation of icons.)")
  336.             (settooltype "(NOICONS)")
  337.             (settooltype "(This is for workbench 2.0 only!)")
  338.             (settooltype "(Not needed if language is english.)")
  339.             (settooltype (cat "LANGUAGE=" @language))
  340.         )
  341.         ))
  342.     ))
  343.     ))
  344.     (set n (+ n 1))
  345. ))
  346.